package com.aspose.cells;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;

class zajy {
   private zoz a = null;
   private Worksheet b = null;
   private Cells c;
   private RowCollection d;
   private zr e;
   private zp f;
   private zpa g;
   private boolean h = false;
   private zbaz i;
   private zp j;
   private Row k;
   private int l;
   private LightCellsDataHandler m;
   private boolean n;
   private boolean o;
   private HashMap p;
   private ArrayList q;
   private zbpx r = null;
   private boolean s = false;
   private boolean t = false;
   private zbbj u;
   private zbbj v = new zbbj();
   private zfv w = new zfv();
   private zfv x = new zfv();
   private zfv y;
   private int z = 0;
   private int A = 0;
   private int B = -1;
   private int[] C;
   private zajm D = null;
   private static final com.aspose.cells.b.c.a.za E = new com.aspose.cells.b.c.a.za(new String[]{"sheetViews", "sheetFormatPr", "cols", "sheetData", "scenarios", "mergeCells", "dataValidations", "hyperlinks", "printOptions", "pageMargins", "pageSetup", "headerFooter", "ignoredErrors", "smartTags", "rowBreaks", "colBreaks", "legacyDrawing", "drawing", "conditionalFormatting", "autoFilter", "sheetProtection", "sheetPr", "controls", "oleObjects", "legacyDrawingHF", "picture", "customProperties", "customSheetViews", "extLst", "protectedRanges", "AlternateContent", "current", "show", "sqref", "comment", "hidden", "locked", "name", "user", "deleted", "numFmtId", "r", "undone", "val", "Choice", "numberStoredAsText", "emptyCellReference", "listDataValidation", "evalError", "twoDigitTextYear", "formulaRange", "unlockedFormula", "formula", "calculatedColumn", "key", "colorId", "guid", "filter", "filterUnique", "fitToPage", "hiddenColumns", "hiddenRows", "outlineSymbols", "printArea", "scale", "showAutoFilter", "showFormulas", "showGridLines", "showPageBreaks", "showRuler", "showRowCol", "showZeros", "view", "topLeftCell", "state", "pageLayout", "pageBreakPreview", "veryHidden", "pane", "selection", "oleObject", "control", "top10", "customFilters", "filters", "dynamicFilter", "colorFilter", "iconFilter", "dateGroupItem", "dateTimeGrouping", "year", "month", "day", "hour", "minute", "second", "n", "s", "str", "e", "b", "min", "max", "width", "style", "customWidth", "outlineLevel", "collapsed", "bestFit", "xmlns", "xmlns:r", "xmlns:xdr", "xmlns:x14", "xmlns:mc", "priority", "type", "dxfId", "operator", "stopIfTrue", "text", "rank", "timePeriod", "percent", "bottom", "aboveAverage", "equalAverage", "stdDev", "id"});

   zajy(zoz var1, zpa var2) {
      this.a = var1;
      this.g = var2;
      this.b = var2.d;
      this.c = this.b.getCells();
      this.e = this.c.f();
      this.d = this.c.getRows();
      this.p = new HashMap();
      this.q = new ArrayList(5);
      this.r = this.a.a.getWorksheets().g;
      this.s = !this.a.a.getSettings().n;
      this.t = var1.a.getSettings().o;
      this.C = new int[16384];

      for(int var3 = 0; var3 < this.C.length; ++var3) {
         this.C[var3] = 15;
      }

      if (var1.j == null) {
         this.l = 65535;
         this.m = null;
         this.n = false;
         this.o = true;
      } else {
         this.l = var1.j.b();
         this.m = var1.j.getLightCellsDataHandler();
         this.n = this.m != null;
         this.o = this.n || (this.l & 1) != 0;
      }

   }

   void a(zcfw var1) throws Exception {
      if (this.F(var1)) {
         if (!var1.n()) {
            var1.d();

            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  if (var1.r() == 4) {
                     break;
                  }

                  var1.a();
               } else {
                  switch(E.a(var1.p())) {
                  case 0:
                     this.C(var1);
                     break;
                  case 1:
                     this.t(var1);
                     break;
                  case 2:
                     this.B(var1);
                     break;
                  case 3:
                     this.y(var1);
                     break;
                  case 4:
                     this.b(var1);
                     break;
                  case 5:
                     this.x(var1);
                     break;
                  case 6:
                     this.a(var1, false);
                     break;
                  case 7:
                     this.v(var1);
                     break;
                  case 8:
                     this.c(var1, this.b.getPageSetup());
                     break;
                  case 9:
                     this.b(var1, this.b.getPageSetup());
                     break;
                  case 10:
                     this.a((zcfw)var1, (PageSetup)this.b.getPageSetup(), (znb)null);
                     break;
                  case 11:
                     this.a(var1, this.b.getPageSetup());
                     break;
                  case 12:
                     this.e(var1);
                     break;
                  case 13:
                     this.f(var1);
                     break;
                  case 14:
                     this.a(var1, true, this.b.getHorizontalPageBreaks(), this.b.getVerticalPageBreaks());
                     break;
                  case 15:
                     this.a(var1, false, this.b.getHorizontalPageBreaks(), this.b.getVerticalPageBreaks());
                     break;
                  case 16:
                     this.u(var1);
                     break;
                  case 17:
                     this.p(var1);
                     break;
                  case 18:
                     this.b(var1, false);
                     break;
                  case 19:
                     a(var1, this.g.d.getAutoFilter());
                     break;
                  case 20:
                     this.o(var1);
                     break;
                  case 21:
                     this.r(var1);
                     break;
                  case 22:
                     this.d(var1, false);
                     break;
                  case 23:
                     this.n(var1);
                     break;
                  case 24:
                     this.q(var1);
                     break;
                  case 25:
                     this.m(var1);
                     break;
                  case 26:
                     this.l(var1);
                     break;
                  case 27:
                     this.j(var1);
                     break;
                  case 28:
                     this.i(var1);
                     break;
                  case 29:
                     this.h(var1);
                     break;
                  case 30:
                     this.d(var1);
                     break;
                  default:
                     var1.a();
                  }
               }
            }

         }
      }
   }

   private void b(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else {
         ScenarioCollection var2 = this.b.getScenarios();
         if (var1.m()) {
            while(var1.l()) {
               switch(E.a(var1.p())) {
               case 31:
                  var2.b = zase.C(var1.s());
                  break;
               case 32:
                  var2.c = zase.C(var1.s());
                  break;
               case 33:
                  var2.d = new ArrayList();
                  this.a(var1.s(), var2.d);
               }
            }

            var1.k();
         }

         if (var1.n()) {
            var1.a();
         } else {
            var1.d();

            while(zass.a(var1)) {
               if ("scenario".equals(var1.p())) {
                  this.c(var1);
               } else {
                  var1.a();
               }
            }

         }
      }
   }

   private void c(zcfw var1) throws Exception {
      Scenario var2 = new Scenario();
      this.b.getScenarios().a(var2);
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            switch(E.a(var1.p())) {
            case 34:
               var2.a = var1.s();
               break;
            case 35:
               var2.d = zase.ax(var1.s());
               break;
            case 36:
               var2.e = zase.ax(var1.s());
               break;
            case 37:
               var2.b = var1.s();
               break;
            case 38:
               var2.c = var1.s();
            }
         }
      }

      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         for(; zass.a(var1); var1.a()) {
            if ("inputCells".equals(var1.p())) {
               ScenarioInputCell var3 = new ScenarioInputCell();
               var2.getInputCells().a(var3);
               if (var1.m()) {
                  while(var1.l()) {
                     switch(E.a(var1.p())) {
                     case 39:
                        var3.e = zase.ax(var1.s());
                        break;
                     case 40:
                        var3.d = zase.C(var1.s());
                        break;
                     case 41:
                        var3.a(var1.s());
                        break;
                     case 42:
                        var3.f = zase.ax(var1.s());
                        break;
                     case 43:
                        var3.c = var1.s();
                     }
                  }
               }
            }
         }

      }
   }

   private void d(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            switch(E.a(var1.p())) {
            case 44:
               this.a(var1, "controls", this.b.g.k);
               break;
            default:
               String var2 = var1.u();
               if (var2.length() > 27) {
                  com.aspose.cells.b.a.a.ze.a(this.b.g.l, (Object)var2);
               }
            }
         }

      }
   }

   private void e(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();
         ErrorCheckOptionCollection var2 = this.b.getErrorCheckOptions();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else {
                  if ("ignoredError".equals(var1.p())) {
                     int var3 = var2.add();
                     ErrorCheckOption var4 = var2.get(var3);

                     while(var1.l()) {
                        switch(E.a(var1.p())) {
                        case 33:
                           String var5 = var1.s();
                           ArrayList var6 = new ArrayList();
                           this.a(var5, var6);
                           var4.a = var6;
                        case 34:
                        case 35:
                        case 36:
                        case 37:
                        case 38:
                        case 39:
                        case 40:
                        case 41:
                        case 42:
                        case 43:
                        case 44:
                        default:
                           break;
                        case 45:
                           var4.setErrorCheck(4, !zase.ax(var1.s()));
                           break;
                        case 46:
                           var4.setErrorCheck(2, !zase.ax(var1.s()));
                           break;
                        case 47:
                           var4.setErrorCheck(128, !zase.ax(var1.s()));
                           break;
                        case 48:
                           var4.setErrorCheck(1, !zase.ax(var1.s()));
                           break;
                        case 49:
                           var4.setErrorCheck(32, !zase.ax(var1.s()));
                           break;
                        case 50:
                           var4.setErrorCheck(8, !zase.ax(var1.s()));
                           break;
                        case 51:
                           var4.setErrorCheck(64, !zase.ax(var1.s()));
                           break;
                        case 52:
                           var4.setErrorCheck(16, !zase.ax(var1.s()));
                           break;
                        case 53:
                           var4.setErrorCheck(129, !zase.ax(var1.s()));
                        }
                     }

                     var1.k();
                  }

                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void f(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("cellSmartTags".equals(var1.p())) {
               this.g(var1);
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void g(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         String var2 = var1.a("r");
         int var3 = this.b.getSmartTagSetting().add(var2);
         SmartTagCollection var4 = this.b.getSmartTagSetting().get(var3);
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("cellSmartTag".equals(var1.p())) {
               this.a(var1, var4);
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void a(zcfw var1, SmartTagCollection var2) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         String var3 = var1.a("type");
         int var4 = com.aspose.cells.b.a.zo.a(var3);
         if (var4 > this.b.c().aa().getCount()) {
            var1.a();
         } else {
            SmartTag var5 = new SmartTag(var2);
            var5.a(this.b.c().aa().a(var4));
            var2.a(var5);
            String var6 = var1.a("deleted");
            if (var6 != null && "1".equals(var6)) {
               var5.setDeleted(true);
            }

            String var7 = var1.a("xmlBased");
            if (var7 != null && "1".equals(var7)) {
               var5.a(true);
            }

            var1.d();

            while(true) {
               while(var1.r() != 4) {
                  var1.j();
                  if (var1.r() != 1) {
                     var1.a();
                  } else {
                     if ("cellSmartTagPr".equals(var1.p())) {
                        if (var1.m()) {
                           String var8 = null;
                           String var9 = null;

                           while(var1.l()) {
                              switch(E.a(var1.p())) {
                              case 43:
                                 var9 = var1.s();
                                 break;
                              case 54:
                                 var8 = var1.s();
                              }
                           }

                           if (var8 != null) {
                              var5.getProperties().add(var8, var9);
                           }
                        }

                        var1.k();
                     }

                     var1.a();
                  }
               }

               var1.h();
               return;
            }
         }
      }
   }

   private void h(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() == 1 && "protectedRange".equals(var1.p())) {
                  String var2 = var1.a("name");
                  String var3 = var1.a("sqref");
                  String var4 = var1.a("password");
                  String var5 = var1.a("securityDescriptor");
                  if (var2 != null && var3 != null && var3.length() > 0) {
                     ArrayList var6 = new ArrayList();
                     this.a(var3, var6);
                     int var7 = this.b.getAllowEditRanges().a(var2, var6);
                     ProtectedRange var8 = this.b.getAllowEditRanges().get(var7);
                     if (var4 != null && !"".equals(var4)) {
                        var8.a(com.aspose.cells.b.a.zo.a(var4, 515, com.aspose.cells.b.a.c.za.b()));
                     }

                     var8.setSecurityDescriptor(var5);
                  }

                  var1.a();
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void i(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else {
         zajz var2 = new zajz(this.a, this.g);
         var2.a(var1, this);
      }
   }

   private void j(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            if ("customSheetView".equals(var1.p())) {
               this.k(var1);
            } else {
               var1.a();
            }
         }

      }
   }

   private void k(zcfw var1) throws Exception {
      znb var2 = new znb(this.b);
      this.b.D().a(var2);
      if (var1.m()) {
         while(var1.l()) {
            switch(E.a(var1.p())) {
            case 55:
               var2.f(zase.C(var1.s()));
               break;
            case 56:
               var2.n = new com.aspose.cells.b.a.zh(var1.s().substring(1, 1 + (var1.s().length() - 2)));
               break;
            case 57:
               var2.f(zase.ax(var1.s()));
               break;
            case 58:
               var2.g(zase.ax(var1.s()));
               break;
            case 59:
               var2.e().setPercentScale(!zase.ax(var1.s()));
               break;
            case 60:
               var2.b(zase.ax(var1.s()));
               break;
            case 61:
               var2.a(zase.ax(var1.s()));
               break;
            case 62:
               var2.r(zase.ax(var1.s()));
               break;
            case 63:
               var2.h(zase.ax(var1.s()));
               break;
            case 64:
               var2.c(zase.C(var1.s()));
               break;
            case 65:
               var2.e(zase.ax(var1.s()));
               break;
            case 66:
               var2.l(zase.ax(var1.s()));
               break;
            case 67:
               var2.m(zase.ax(var1.s()));
               break;
            case 68:
               var2.d(zase.ax(var1.s()));
               break;
            case 69:
               var2.s(zase.ax(var1.s()));
               break;
            case 70:
               var2.n(zase.ax(var1.s()));
               break;
            case 71:
               var2.q(zase.ax(var1.s()));
               break;
            case 72:
               switch(E.a(var1.s())) {
               case 75:
                  var2.d(2);
                  continue;
               case 76:
                  var2.d(1);
               default:
                  continue;
               }
            case 73:
               byte var3 = 0;
               byte var4 = 0;
               int[] var5 = new int[]{var3};
               int[] var6 = new int[]{var4};
               CellsHelper.a(var1.s(), var5, var6);
               int var7 = var5[0];
               int var9 = var6[0];
               var2.a(var7);
               var2.b(var9);
               break;
            case 74:
               switch(E.a(var1.s())) {
               case 35:
                  var2.e(1);
                  break;
               case 77:
                  var2.e(2);
               }
            }
         }
      }

      if (var1.n()) {
         var1.a();
      } else {
         zqh var8 = new zqh();
         var1.d();

         while(zass.a(var1)) {
            switch(E.a(var1.p())) {
            case 8:
               this.c(var1, var2.e());
               break;
            case 9:
               this.b(var1, var2.e());
               break;
            case 10:
               this.a(var1, var2.e(), var2);
               break;
            case 11:
               this.a(var1, var2.e());
               break;
            case 14:
               this.a(var1, true, var2.f(), var2.g());
               break;
            case 15:
               this.a(var1, false, var2.f(), var2.g());
               break;
            case 19:
               a(var1, var2.b());
               break;
            case 28:
               var2.c = var1.u();
               break;
            case 78:
               var8.a = this.E(var1);
               break;
            case 79:
               if (var1.m()) {
                  zqj var10 = new zqj();
                  var10.b = var1.a("activeCell");
                  var10.d = var1.a("sqref");
                  var10.a = var1.a("pane");
                  String var11 = var1.a("activeCellId");
                  if (var11 != null) {
                     var10.c = zase.C(var11);
                  }

                  com.aspose.cells.b.a.a.ze.a(var8.b, (Object)var10);
               }

               var1.a();
               break;
            default:
               var1.a();
            }
         }

         var8.a(var2);
      }
   }

   private void l(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         this.g.k = new HashMap();
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("customPr".equals(var1.p())) {
               String var2 = var1.a("name");
               String var3 = var1.a("id", (String)null);
               this.g.k.put(var2, var3);
               var1.a();
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void m(zcfw var1) throws Exception {
      this.g.i = var1.a("id", (String)null);
      var1.a();
      if (this.g.i == null) {
         throw new CellsException(6, "Invalid Picture r:id element");
      }
   }

   private void n(zcfw var1) throws Exception {
      if ((this.l & 4) == 0) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("oleObject".equals(var1.p())) {
               this.c(var1, false);
            } else if ("AlternateContent".equals(var1.p())) {
               this.a(var1, true, "oleObject");
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void a(zcfw var1, boolean var2, String var3) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(zass.a(var1)) {
               if ("Choice".equals(var1.p())) {
                  if (var2) {
                     this.a((zcfw)var1, (String)var3, (ArrayList)null);
                     continue;
                  }
               } else if ("Fallback".equals(var1.p()) && !var2) {
                  this.a((zcfw)var1, (String)var3, (ArrayList)null);
                  continue;
               }

               var1.a();
            }

            return;
         }
      }
   }

   private void a(zcfw var1, String var2, ArrayList var3) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            if (com.aspose.cells.b.a.zv.b(var1.p(), var2)) {
               switch(E.a(var2)) {
               case 22:
                  this.d(var1, true);
                  break;
               case 80:
                  this.c(var1, true);
                  break;
               case 81:
                  this.e(var1, true);
                  break;
               default:
                  var1.a();
               }
            } else {
               switch(E.a(var1.p())) {
               case 16:
                  this.u(var1);
                  break;
               default:
                  if (var3 != null) {
                     com.aspose.cells.b.a.a.ze.a(var3, (Object)var1.u());
                  } else {
                     var1.a();
                  }
               }
            }
         }

      }
   }

   private void c(zcfw var1, boolean var2) throws Exception {
      if (!var1.m()) {
         var1.a();
      } else {
         zox var3 = new zox(var2);

         String var4;
         zqe var5;
         while(var1.l()) {
            if ("progId".equals(var1.p())) {
               var3.f = var1.s();
            } else if ("id".equals(var1.p())) {
               var4 = var1.s();
               var5 = this.g.b(var4);
               if (var5 != null) {
                  var3.c = var5.e;
               }
            } else if ("shapeId".equals(var1.p())) {
               var3.b = var1.s();
            } else if ("link".equals(var1.p())) {
               var3.g = var1.s();
            } else if ("oleUpdate".equals(var1.p())) {
               var3.h = var1.s();
            } else if ("dvAspect".equals(var1.p())) {
               var3.i = var1.s();
            }
         }

         var1.k();
         this.g.p.put("\u0000s" + var3.b, var3);
         if (var1.n()) {
            var1.a();
         } else {
            var1.d();

            for(; zass.a(var1); var1.a()) {
               if ("objectPr".equals(var1.p())) {
                  var4 = var1.a("id", (String)null);
                  var5 = this.g.b(var4);
                  if (var5 != null) {
                     var3.d = var5.e;
                  }
               }
            }

         }
      }
   }

   private void d(zcfw var1, boolean var2) throws Exception {
      if ((this.l & 4) == 0) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            switch(E.a(var1.p())) {
            case 30:
               this.a(var1, true, "control");
               break;
            case 81:
               this.e(var1, var2);
               break;
            default:
               var1.a();
            }
         }

      }
   }

   private void e(zcfw var1, boolean var2) throws Exception {
      zpf var3 = null;
      if (var1.m()) {
         var3 = new zpf(var2);

         while(var1.l()) {
            if ("shapeId".equals(var1.p())) {
               var3.b = var1.s();
            } else if ("id".equals(var1.p())) {
               zqe var4 = this.g.b(var1.s());
               if (var4 != null) {
                  var3.c = var4.e;
                  var3.g = var4.d;
               }
            } else if ("name".equals(var1.p())) {
               var3.a = var1.s();
            }
         }

         var1.k();
         this.g.p.put("\u0000s" + var3.b, var3);
      }

      if (var3 != null && !var1.n()) {
         var1.d();

         for(; zass.a(var1); var1.a()) {
            if ("controlPr".equals(var1.p())) {
               String var6 = var1.a("id", (String)null);
               if (var6 != null) {
                  zqe var5 = this.g.b(var6);
                  if (var5 != null) {
                     var3.d = var5.e;
                  }
               }
            }
         }

      } else {
         var1.a();
      }
   }

   private void a() {
      Protection var1 = this.b.getProtection();
      var1.setAllowDeletingColumn(false);
      var1.setAllowDeletingRow(false);
      var1.setAllowEditingContent(true);
      var1.setAllowEditingObject(true);
      var1.setAllowEditingScenario(true);
      var1.setAllowFiltering(false);
      var1.setAllowFormattingCell(false);
      var1.setAllowFormattingColumn(false);
      var1.setAllowFormattingRow(false);
      var1.setAllowInsertingColumn(false);
      var1.setAllowInsertingHyperlink(false);
      var1.setAllowInsertingRow(false);
      var1.setAllowSelectingLockedCell(true);
      var1.setAllowSelectingUnlockedCell(true);
      var1.setAllowSorting(false);
      var1.setAllowUsingPivotTable(false);
   }

   private void o(zcfw var1) throws Exception {
      if (var1.m()) {
         this.a();
         Protection var2 = this.b.getProtection();

         while(var1.l()) {
            if ("password".equals(var1.p())) {
               var2.a(com.aspose.cells.b.a.zo.a(var1.s(), 515, com.aspose.cells.b.a.c.za.b()));
            } else if ("sheet".equals(var1.p())) {
               var2.setAllowEditingContent(!zase.ax(var1.s()));
            } else if ("objects".equals(var1.p())) {
               var2.setAllowEditingObject(!zase.ax(var1.s()));
            } else if ("scenarios".equals(var1.p())) {
               var2.setAllowEditingScenario(!zase.ax(var1.s()));
            } else if ("formatCells".equals(var1.p())) {
               var2.setAllowFormattingCell(!zase.ax(var1.s()));
            } else if ("formatColumns".equals(var1.p())) {
               var2.setAllowFormattingColumn(!zase.ax(var1.s()));
            } else if ("formatRows".equals(var1.p())) {
               var2.setAllowFormattingRow(!zase.ax(var1.s()));
            } else if ("insertColumns".equals(var1.p())) {
               var2.setAllowInsertingColumn(!zase.ax(var1.s()));
            } else if ("insertRows".equals(var1.p())) {
               var2.setAllowInsertingRow(!zase.ax(var1.s()));
            } else if ("insertHyperlinks".equals(var1.p())) {
               var2.setAllowInsertingHyperlink(!zase.ax(var1.s()));
            } else if ("deleteColumns".equals(var1.p())) {
               var2.setAllowDeletingColumn(!zase.ax(var1.s()));
            } else if ("deleteRows".equals(var1.p())) {
               var2.setAllowDeletingRow(!zase.ax(var1.s()));
            } else if ("selectLockedCells".equals(var1.p())) {
               var2.setAllowSelectingLockedCell(!zase.ax(var1.s()));
            } else if ("sort".equals(var1.p())) {
               var2.setAllowSorting(!zase.ax(var1.s()));
            } else if ("autoFilter".equals(var1.p())) {
               var2.setAllowFiltering(!zase.ax(var1.s()));
            } else if ("pivotTables".equals(var1.p())) {
               var2.setAllowUsingPivotTable(!zase.ax(var1.s()));
            } else if ("selectUnlockedCells".equals(var1.p())) {
               var2.setAllowSelectingUnlockedCell(!zase.ax(var1.s()));
            } else if ("algorithmName".equals(var1.p())) {
               var2.a().a = var1.s();
            } else if ("hashValue".equals(var1.p())) {
               var2.a().b = com.aspose.cells.b.a.ze.b(var1.s());
            } else if ("saltValue".equals(var1.p())) {
               var2.a().c = com.aspose.cells.b.a.ze.b(var1.s());
            } else if ("spinCount".equals(var1.p())) {
               var2.a().d = zase.C(var1.s());
            }
         }

         var1.k();
      }

      var1.a();
   }

   static void a(zcfw var0, DataSorter var1) throws Exception {
      c(var0, var1);
      if (var0.n()) {
         var0.a();
      } else {
         var0.d();

         while(var0.r() != 4) {
            var0.j();
            if (var0.r() != 1) {
               var0.a();
            } else if ("sortCondition".equals(var0.p())) {
               b(var0, var1);
            } else {
               var0.a();
            }
         }

         var0.h();
      }
   }

   private static void b(zcfw var0, DataSorter var1) throws Exception {
      if (!var0.m()) {
         var0.a();
      } else {
         zql var2 = new zql(var1);
         String var3 = null;

         while(var0.l()) {
            if ("customList".equals(var0.p())) {
               var2.a(var0.s());
            } else if ("descending".equals(var0.p())) {
               var2.a(zase.ax(var0.s()) ? 1 : 0);
            } else if ("dxfId".equals(var0.p())) {
               int var4 = zase.C(var0.s());
               if (var4 >= 0 && var4 <= var1.a.getWorksheets().getDxfs().getCount()) {
                  Style var5 = new Style(var1.a.getWorksheets());
                  var5.copy(var1.a.getWorksheets().getDxfs().get(var4));
                  var2.a(var5);
               }
            } else if ("iconId".equals(var0.p())) {
               var2.a(var2.h(), zase.C(var0.s()));
            } else if ("iconSet".equals(var0.p())) {
               var2.a(zase.V(var0.s()), var2.i());
            } else if ("ref".equals(var0.p())) {
               var3 = var0.s();
            } else if ("sortBy".equals(var0.p())) {
               String var8 = var0.s();
               if ("value".equals(var8)) {
                  var2.c(0);
               } else if ("cellColor".equals(var8)) {
                  var2.c(1);
               } else if ("fontColor".equals(var8)) {
                  var2.c(2);
               } else if ("icon".equals(var8)) {
                  var2.c(3);
               }
            }
         }

         if (var3 != null) {
            var1.a(var2);
            CellArea var9 = (CellArea)CellArea.a(var3, true);
            int var6;
            int var10;
            if (var2.a().getSortLeftToRight()) {
               var10 = var9.StartRow;
               var6 = var9.EndRow;
            } else {
               var10 = var9.StartColumn;
               var6 = var9.EndColumn;
            }

            var2.b(var10);

            while(var10 < var6) {
               ++var10;
               zql var7 = new zql(var1);
               var7.a(var2);
               var7.b(var10);
               var1.a(var7);
            }

            var0.k();
            var0.a();
         }
      }
   }

   private static void c(zcfw var0, DataSorter var1) throws Exception {
      if (!var0.m()) {
         var0.a();
      } else {
         while(var0.l()) {
            if ("caseSensitive".equals(var0.p())) {
               var1.setCaseSensitive(zase.ax(var0.s()));
            } else if ("columnSort".equals(var0.p())) {
               var1.setSortLeftToRight(zase.ax(var0.s()));
            } else if ("ref".equals(var0.p())) {
               var1.a((CellArea)CellArea.a(var0.s(), true));
            } else if ("sortMethod".equals(var0.p())) {
               var1.b = var0.s();
            }
         }

         var0.k();
      }
   }

   static void a(zcfw var0, AutoFilter var1) throws Exception {
      String var2 = var0.a("ref", "");
      if (var2 == null) {
         throw new CellsException(6, "Invalid autoFilter element");
      } else {
         var1.setRange(var2);
         if (var0.n()) {
            var0.a();
         } else {
            var0.d();

            while(var0.r() != 4) {
               var0.j();
               if (var0.r() != 1) {
                  var0.a();
               } else if ("filterColumn".equals(var0.p())) {
                  b(var0, var1);
               } else if ("sortState".equals(var0.p())) {
                  a(var0, var1.getSorter());
               } else {
                  var0.a();
               }
            }

            var0.h();
         }
      }
   }

   private static void b(zcfw var0, AutoFilter var1) throws Exception {
      int var2 = 0;
      String var3 = var0.a("colId", "");
      if (var3 != null) {
         var2 = zase.C(var3);
      }

      String var4 = var0.a("hiddenButton");
      boolean var5 = false;
      if (var4 != null) {
         var5 = "1".equals(var4);
      }

      var4 = var0.a("showButton");
      boolean var6 = true;
      if (var4 != null) {
         var6 = "1".equals(var4);
      }

      FilterColumn var7 = null;
      if (var0.n()) {
         var0.a();
      } else {
         var0.d();

         while(true) {
            while(var0.r() != 4) {
               var0.j();
               if (var0.r() != 1) {
                  var0.a();
               } else {
                  String var8;
                  String var9;
                  String var21;
                  switch(E.a(var0.p())) {
                  case 82:
                     var7 = new FilterColumn(var1.e, var2, var5, var6);
                     var7.setFilterType(5);
                     var8 = var0.a("top");
                     var9 = var0.a("percent");
                     var21 = var0.a("val");
                     String var22 = var0.a("filterVal");
                     boolean var12 = !"0".equals(var8);
                     boolean var13 = "1".equals(var9);
                     int var14 = 10;
                     if (var21 != null) {
                        var14 = zase.C(var21);
                     }

                     Top10Filter var15 = new Top10Filter(var12, var13, var14);
                     var7.setFilter(var15);

                     try {
                        var15.setCriteria(zase.B(var22));
                     } catch (Exception var17) {
                        ;
                     }

                     var0.a();
                     break;
                  case 83:
                     var7 = new FilterColumn(var1.e, var2, var5, var6);
                     var7.setFilterType(1);
                     CustomFilterCollection var19 = new CustomFilterCollection();
                     var7.setFilter(var19);
                     a(var0, var19);
                     break;
                  case 84:
                     var7 = new FilterColumn(var1.e, var2, var5, var6);
                     var7.setFilterType(3);
                     MultipleFilterCollection var18 = new MultipleFilterCollection();
                     var7.setFilter(var18);
                     a(var0, var18);
                     break;
                  case 85:
                     var8 = var0.a("type");
                     var9 = var0.a("val");
                     var21 = var0.a("maxVal");
                     var7 = new FilterColumn(var1.e, var2, var5, var6);
                     var7.setFilterType(2);
                     DynamicFilter var11 = new DynamicFilter();
                     var7.setFilter(var11);
                     var11.setDynamicFilterType(zase.am(var8));
                     if (var9 != null && zapb.b(var9)) {
                        var11.setValue(zase.B(var9));
                     }

                     if (var21 != null && zapb.b(var21)) {
                        var11.setMaxValue(zase.B(var21));
                     }

                     var0.a();
                     break;
                  case 86:
                     var8 = var0.a("cellColor");
                     var9 = var0.a("dxfId");
                     var7 = new FilterColumn(var1.e, var2, var5, var6);
                     var7.setFilterType(0);
                     ColorFilter var20 = new ColorFilter(var7);
                     var7.setFilter(var20);
                     var20.setFilterByFillColor(var8 == null || "1".equals(var8));
                     var20.a(zase.C(var9));
                     var0.a();
                     break;
                  case 87:
                     var8 = var0.a("iconId");
                     var9 = var0.a("iconSet");
                     var7 = new FilterColumn(var1.e, var2, var5, var6);
                     var7.setFilterType(4);
                     IconFilter var10 = new IconFilter(var7);
                     var7.setFilter(var10);
                     if (var9 != null) {
                        var10.setIconSetType(zase.V(var9));
                     }

                     if (var8 != null) {
                        var10.setIconId(zase.C(var8));
                     }

                     var0.a();
                     break;
                  default:
                     var0.a();
                  }
               }
            }

            var0.h();
            if (var7 != null) {
               var1.e.a(var7);
            }

            return;
         }
      }
   }

   private static void a(zcfw var0, MultipleFilterCollection var1) throws Exception {
      String var2 = var0.a("blank", "");
      if ("1".equals(var2)) {
         var1.setMatchBlank(true);
      }

      var1.b = var0.a("calendarType");
      if (var0.n()) {
         var0.a();
      } else {
         var0.d();

         while(true) {
            while(var0.r() != 4) {
               var0.j();
               if (var0.r() != 1) {
                  var0.a();
               } else {
                  switch(E.a(var0.p())) {
                  case 57:
                     var1.b(var0.a("val"));
                     var0.a();
                     break;
                  case 88:
                     DateTimeGroupItem var3 = new DateTimeGroupItem();
                     var1.a(var3);
                     if (var0.m()) {
                        while(var0.l()) {
                           switch(E.a(var0.p())) {
                           case 89:
                              var3.setDateTimeGroupingType(zase.an(var0.s()));
                              break;
                           case 90:
                              var3.setYear(zase.C(var0.s()));
                              break;
                           case 91:
                              var3.setMonth(zase.C(var0.s()));
                              break;
                           case 92:
                              var3.setDay(zase.C(var0.s()));
                              break;
                           case 93:
                              var3.setHour(zase.C(var0.s()));
                              break;
                           case 94:
                              var3.setMinute(zase.C(var0.s()));
                              break;
                           case 95:
                              var3.setSecond(zase.C(var0.s()));
                           }
                        }

                        var0.k();
                     }

                     var0.a();
                     break;
                  default:
                     var0.a();
                  }
               }
            }

            var0.h();
            return;
         }
      }
   }

   private static void a(zcfw var0, CustomFilterCollection var1) throws Exception {
      String var2 = var0.a("and", "");
      var1.setAnd("1".equals(var2));
      if (var0.n()) {
         var0.a();
      } else {
         var0.d();

         while(var0.r() != 4) {
            var0.j();
            if (var0.r() != 1) {
               var0.a();
            } else if ("customFilter".equals(var0.p())) {
               String var3 = var0.a("operator");
               String var4 = var0.a("val");
               String var5 = var4.trim();
               CustomFilter var6 = new CustomFilter();
               var1.a(var6);
               var6.setFilterOperatorType(zase.ap(var3));
               if ("".equals(var5)) {
                  var6.setCriteria((Object)null);
               } else if (zapb.b(var4)) {
                  var6.setCriteria(zase.B(var4));
               } else {
                  var6.setCriteria(var4);
               }

               var0.a();
            } else {
               var0.a();
            }
         }

         var0.h();
      }
   }

   private void p(zcfw var1) throws Exception {
      if ((this.l & 4) == 0) {
         var1.a();
      } else {
         this.g.h = var1.a("id", (String)null);
         var1.a();
         if (this.g.h == null) {
            throw new CellsException(6, "Invalid DrawingRid element");
         } else {
            String var2 = this.g.a(this.g.h);
            this.b.g.c = "xl" + var2.substring(2);
         }
      }
   }

   private void q(zcfw var1) throws Exception {
      this.g.g = var1.a("id", (String)null);
      var1.a();
      if (this.g.g == null) {
         throw new CellsException(6, "Invalid LegacyDrawingHFRid element");
      }
   }

   private void r(zcfw var1) throws Exception {
      String var2 = var1.a("codeName");
      if (var2 != null && var2.length() > 0) {
         this.b.k = var2;
      }

      this.b.g.e = var1.a("published");
      String var3 = var1.a("transitionEvaluation");
      if (var3 != null) {
         this.b.setTransitionEvaluation(zase.b(var3, false));
      }

      String var4 = var1.a("transitionEntry");
      this.b.setTransitionEntry(zase.b(var4, false));
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("pageSetUpPr".equals(var1.p())) {
               String var5 = var1.a("fitToPage");
               if (var5 != null) {
                  this.b.getPageSetup().setPercentScale("0".equals(var5));
               }

               var1.a();
            } else if ("tabColor".equals(var1.p())) {
               this.b.j = zajp.g(var1);
            } else if ("outlinePr".equals(var1.p())) {
               this.s(var1);
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void s(zcfw var1) throws Exception {
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            if ("summaryBelow".equals(var1.p())) {
               if ("0".equals(var1.s())) {
                  this.b.getOutline().SummaryRowBelow = false;
               }
            } else if ("summaryRight".equals(var1.p()) && "0".equals(var1.s())) {
               this.b.getOutline().SummaryColumnRight = false;
            }
         }
      }

      var1.a();
   }

   private void a(double var1, boolean var3) {
      if (Math.abs(var1 - 0.0D) < 1.0E-4D) {
         this.c.a(0.0D);
      } else {
         int var4 = this.a.a.getWorksheets().I();
         double var5 = var1 * (double)var4;
         if (var3) {
            var5 += 10.0D;
         }

         if (var5 > 5.0D) {
            this.c.a((var5 - 5.0D) / (double)var4);
         } else {
            this.c.a(0.0D);
            ColumnCollection var7 = this.b.getCells().getColumns();
            if (var7.b == null) {
               var7.a().b((int)(var5 + 0.5D));
            }
         }
      }

   }

   private void t(zcfw var1) throws Exception {
      if ((this.l & 256) == 0) {
         var1.a();
      } else {
         boolean var2 = false;
         if (var1.m()) {
            while(true) {
               while(var1.l()) {
                  if ("defaultRowHeight".equals(var1.p())) {
                     this.c.setStandardHeight(zase.B(var1.s()));
                  } else {
                     double var3;
                     if ("defaultColWidth".equals(var1.p())) {
                        var3 = zase.B(var1.s());
                        this.a(var3, false);
                     } else if ("baseColWidth".equals(var1.p())) {
                        var3 = zase.B(var1.s());
                        if (var3 != 0.0D) {
                           this.a(var3, true);
                        }
                     } else if ("outlineLevelRow".equals(var1.p())) {
                        this.c.c((byte)zase.C(var1.s()));
                     } else if ("outlineLevelCol".equals(var1.p())) {
                        this.c.b((byte)zase.C(var1.s()));
                     } else if ("zeroHeight".equals(var1.p()) && "1".equals(var1.s())) {
                        this.c.a(true);
                     } else if ("customHeight".equals(var1.p()) && "1".equals(var1.s())) {
                        var2 = true;
                     }
                  }
               }

               var1.k();
               break;
            }
         }

         var1.a();
         if (var2) {
            this.c.setDefaultRowHeightMatched(false);
         } else {
            this.c.setDefaultRowHeightMatched(true);
         }

      }
   }

   private void u(zcfw var1) throws Exception {
      if ((this.l & 4) == 0) {
         var1.a();
      } else {
         this.g.f = var1.a("id", (String)null);
         var1.a();
         if (this.g.f == null) {
            throw new CellsException(6, "Invalid legacyDrawing element");
         } else {
            String var2 = this.g.a(this.g.f);
            if (var2.charAt(0) == '/') {
               this.b.g.d = "xl" + var2.substring(3);
            } else {
               this.b.g.d = "xl" + var2.substring(2);
            }

         }
      }
   }

   private void v(zcfw var1) throws Exception {
      if (this.l != 65535) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         int var2 = zase.a(var1);
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("hyperlink".equals(var1.p())) {
               this.w(var1);
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void w(zcfw var1) throws Exception {
      if (!var1.m()) {
         throw new CellsException(6, "Invalid Hyperlink element");
      } else {
         String var2 = null;
         String var3 = null;
         String var4 = null;
         String var5 = null;
         String var6 = null;

         while(var1.l()) {
            if ("ref".equals(var1.p())) {
               var2 = var1.s();
            } else if ("id".equals(var1.p())) {
               var3 = var1.s();
            } else if ("location".equals(var1.p())) {
               var4 = var1.s();
            } else if ("display".equals(var1.p())) {
               var5 = var1.s();
            } else if ("tooltip".equals(var1.p())) {
               var6 = var1.s();
            }
         }

         var1.k();
         var1.a();
         if (var2 == null) {
            throw new CellsException(6, "Invalid Hyperlink element");
         } else {
            CellArea var7 = (CellArea)CellArea.a(var2, true);
            if (var3 != null) {
               HashMap var8 = this.g.e;
               if (var8 != null && var8.containsKey(var3)) {
                  zqe var9 = (zqe)var8.get(var3);
                  String var10 = zbue.b(var9.e);
                  if (var10 != null && var10.startsWith("file:///")) {
                     var10 = var10.substring("file:///".length());
                  }

                  if (var4 == null) {
                     var4 = var10;
                  } else {
                     var4 = var10 + "#" + var4;
                  }
               }
            }

            int var11 = this.b.getHyperlinks().a(var7.StartRow, var7.StartColumn, var7.EndRow - var7.StartRow + 1, var7.EndColumn - var7.StartColumn + 1, var4);
            Hyperlink var12 = this.b.getHyperlinks().get(var11);
            if (var5 == null) {
               var5 = this.b.getCells().get(var7.StartRow, var7.StartColumn).getStringValue();
               if ("".equals(var5)) {
                  var5 = null;
               }
            }

            if (var5 != null) {
               var12.b(var5);
            }

            if (var6 != null) {
               var12.setScreenTip(var6);
            }

         }
      }
   }

   void a(zcfw var1, boolean var2) throws Exception {
      if ((this.l & 32) == 0) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         int var3 = zase.a(var1);
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("dataValidation".equals(var1.p())) {
               this.f(var1, var2);
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void f(zcfw var1, boolean var2) throws Exception {
      Validation var3 = this.b.getValidations().get(this.b.getValidations().add());
      var3.setIgnoreBlank(false);
      var3.setShowInput(false);
      var3.setShowError(false);
      var3.setOperator(0);
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            if ("errorStyle".equals(var1.p())) {
               var3.setAlertStyle(zase.m(var1.s()));
            } else if ("type".equals(var1.p())) {
               var3.setType(zase.g(var1.s()));
            } else if ("allowBlank".equals(var1.p()) && "1".equals(var1.s())) {
               var3.setIgnoreBlank(true);
            } else if ("showInputMessage".equals(var1.p()) && "1".equals(var1.s())) {
               var3.setShowInput(true);
            } else if ("showErrorMessage".equals(var1.p()) && "1".equals(var1.s())) {
               var3.setShowError(true);
            } else if ("promptTitle".equals(var1.p())) {
               var3.setInputTitle(var1.s());
            } else if ("prompt".equals(var1.p())) {
               var3.setInputMessage(var1.s());
            } else if ("errorTitle".equals(var1.p())) {
               var3.setErrorTitle(var1.s());
            } else if ("error".equals(var1.p())) {
               var3.setErrorMessage(var1.s());
            } else if ("imeMode".equals(var1.p())) {
               var3.a(zase.n(var1.s()));
            } else if ("sqref".equals(var1.p())) {
               this.a(var1.s(), var3.getAreaList());
            } else if ("operator".equals(var1.p())) {
               var3.setOperator(zase.h(var1.s()));
            } else if ("showDropDown".equals(var1.p()) && "1".equals(var1.s())) {
               var3.setInCellDropDown(false);
            }
         }
      }

      if (var1.n()) {
         var1.a();
      } else {
         var1.d();
         String var4 = null;
         String var5 = null;

         while(true) {
            while(var1.r() != 4) {
               if (var1.r() == 7) {
                  var1.d();
               } else {
                  var1.j();
                  if (var1.r() != 1) {
                     var1.a();
                  } else if ("formula1".equals(var1.p())) {
                     if (!var2) {
                        var4 = var1.i();
                        if (var4 != null && !"".equals(var4) && var4.charAt(0) != '=') {
                           var4 = "=" + var4;
                        }
                     } else {
                        var1.d();

                        while(var1.r() != 4) {
                           var1.j();
                           if (var1.r() != 1) {
                              var1.a();
                           } else if ("f".equals(var1.p())) {
                              var4 = var1.i();
                              if (var4 != null && !"".equals(var4) && var4.charAt(0) != '=') {
                                 var4 = "=" + var4;
                              }
                           } else {
                              var1.a();
                           }
                        }

                        var1.h();
                     }
                  } else if (!"formula2".equals(var1.p())) {
                     if ("sqref".equals(var1.p())) {
                        String var6 = var1.i();
                        if (var6 != null && var6.length() > 0) {
                           this.a(var6, var3.getAreaList());
                        }
                     } else {
                        var1.a();
                     }
                  } else if (!var2) {
                     var5 = var1.i();
                     if (var5 != null && !"".equals(var5) && var5.charAt(0) != '=') {
                        var5 = "=" + var5;
                     }
                  } else {
                     var1.d();

                     while(var1.r() != 4) {
                        var1.j();
                        if (var1.r() != 1) {
                           var1.a();
                        } else if ("f".equals(var1.p())) {
                           var5 = var1.i();
                           if (var5 != null && !"".equals(var5) && var5.charAt(0) != '=') {
                              var5 = "=" + var5;
                           }
                        } else {
                           var1.a();
                        }
                     }

                     var1.h();
                  }
               }
            }

            if (var4 != null) {
               var4 = zase.b(var4);
            }

            if (var5 != null) {
               var5 = zase.b(var5);
            }

            var3.a(var4, var5);
            var1.h();
            return;
         }
      }
   }

   private void a(String var1, ArrayList var2) {
      String[] var3 = com.aspose.cells.b.a.zv.d(var1, ' ');

      for(int var4 = 0; var4 < var3.length; ++var4) {
         String var5 = var3[var4].trim();
         if (var5.length() > 0 && var5.charAt(0) != '#') {
            CellArea var6 = (CellArea)CellArea.a(var5, true);
            com.aspose.cells.b.a.a.ze.a(var2, (Object)var6);
         }
      }

   }

   private void a(zcfw var1, boolean var2, HorizontalPageBreakCollection var3, VerticalPageBreakCollection var4) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         int var5 = zase.a(var1);
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if (!"brk".equals(var1.p())) {
                  var1.a();
               } else {
                  byte var6;
                  byte var7;
                  byte var8;
                  int[] var9;
                  int[] var10;
                  int[] var11;
                  int var12;
                  int var13;
                  int var14;
                  if (var2) {
                     var6 = -1;
                     var7 = -1;
                     var8 = -1;
                     var9 = new int[]{var6};
                     var10 = new int[]{var7};
                     var11 = new int[]{var8};
                     this.a(var1, var9, var10, var11);
                     var12 = var9[0];
                     var13 = var10[0];
                     var14 = var11[0];
                     var1.a();
                     if (var12 != -1) {
                        if (var13 == -1 && var14 == -1) {
                           var3.add(var12, 0);
                        } else {
                           if (var13 == -1) {
                              var13 = 0;
                           }

                           if (var14 == -1 || var14 > 255) {
                              var14 = 255;
                           }

                           var3.add(var12, var13, var14);
                        }
                     }
                  } else {
                     var6 = -1;
                     var7 = -1;
                     var8 = -1;
                     var9 = new int[]{var6};
                     var10 = new int[]{var7};
                     var11 = new int[]{var8};
                     this.a(var1, var9, var10, var11);
                     var12 = var9[0];
                     var13 = var10[0];
                     var14 = var11[0];
                     var1.a();
                     if (var12 != -1) {
                        if (var13 == -1 && var14 == -1) {
                           var4.add(0, var12);
                        } else {
                           if (var13 == -1) {
                              var13 = 0;
                           }

                           if (var14 == -1 || var14 > 65535) {
                              var14 = 65535;
                           }

                           var4.add(var13, var14, var12);
                        }
                     }
                  }
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void a(zcfw var1, int[] var2, int[] var3, int[] var4) throws Exception {
      if (var1.m()) {
         while(var1.l()) {
            if ("id".equals(var1.p())) {
               var2[0] = zase.C(var1.s());
            } else if ("min".equals(var1.p())) {
               var3[0] = zase.C(var1.s());
            } else if ("max".equals(var1.p())) {
               var4[0] = zase.C(var1.s());
            }
         }

         var1.k();
      }
   }

   private void a(zcfw var1, PageSetup var2) throws Exception {
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            if ("differentOddEven".equals(var1.p())) {
               var2.setHFDiffOddEven(zase.ax(var1.s()));
            } else if ("differentFirst".equals(var1.p())) {
               var2.setHFDiffFirst(zase.ax(var1.s()));
            } else if ("scaleWithDoc".equals(var1.p())) {
               var2.setHFScaleWithDoc(zase.ax(var1.s()));
            } else if ("alignWithMargins".equals(var1.p())) {
               var2.setHFAlignMargins(zase.ax(var1.s()));
            }
         }
      }

      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else {
                  String[] var3;
                  int var4;
                  if ("oddHeader".equals(var1.p())) {
                     var3 = a(com.aspose.cells.b.a.zv.a(var1.i(), "\r\n", "\n"));

                     for(var4 = 0; var4 < 3; ++var4) {
                        if (var3[var4] != null) {
                           var2.setHeader(var4, var3[var4]);
                        }
                     }
                  } else if ("oddFooter".equals(var1.p())) {
                     var3 = a(com.aspose.cells.b.a.zv.a(var1.i(), "\r\n", "\n"));

                     for(var4 = 0; var4 < 3; ++var4) {
                        if (var3[var4] != null) {
                           var2.setFooter(var4, var3[var4]);
                        }
                     }
                  } else if ("evenHeader".equals(var1.p())) {
                     var3 = a(com.aspose.cells.b.a.zv.a(var1.i(), "\r\n", "\n"));

                     for(var4 = 0; var4 < 3; ++var4) {
                        if (var3[var4] != null) {
                           var2.setEvenHeader(var4, var3[var4]);
                        }
                     }
                  } else if ("evenFooter".equals(var1.p())) {
                     var3 = a(com.aspose.cells.b.a.zv.a(var1.i(), "\r\n", "\n"));

                     for(var4 = 0; var4 < 3; ++var4) {
                        if (var3[var4] != null) {
                           var2.setEvenFooter(var4, var3[var4]);
                        }
                     }
                  } else if ("firstHeader".equals(var1.p())) {
                     var3 = a(com.aspose.cells.b.a.zv.a(var1.i(), "\r\n", "\n"));

                     for(var4 = 0; var4 < 3; ++var4) {
                        if (var3[var4] != null) {
                           var2.setFirstPageHeader(var4, var3[var4]);
                        }
                     }
                  } else if ("firstFooter".equals(var1.p())) {
                     var3 = a(com.aspose.cells.b.a.zv.a(var1.i(), "\r\n", "\n"));

                     for(var4 = 0; var4 < 3; ++var4) {
                        if (var3[var4] != null) {
                           var2.setFirstPageFooter(var4, var3[var4]);
                        }
                     }
                  } else {
                     var1.a();
                  }
               }
            }

            var1.h();
            return;
         }
      }
   }

   private static String[] a(String var0) {
      String[] var1 = new String[3];
      byte var2 = 1;
      int var3 = 0;

      for(int var4 = 0; var4 < var0.length(); ++var4) {
         if (var0.charAt(var4) == '&' && var4 + 1 < var0.length()) {
            byte var5;
            switch(var0.charAt(var4 + 1)) {
            case '&':
               ++var4;
               continue;
            case 'C':
            case 'c':
               var5 = 1;
               break;
            case 'L':
            case 'l':
               var5 = 0;
               break;
            case 'R':
            case 'r':
               var5 = 2;
               break;
            default:
               continue;
            }

            if (var4 - var3 > 0) {
               var1[var2] = var0.substring(var3, var3 + (var4 - var3));
            }

            var2 = var5;
            var3 = var4 + 2;
         }
      }

      if (var3 < var0.length()) {
         var1[var2] = var0.substring(var3);
      }

      return var1;
   }

   private void a(zcfw var1, PageSetup var2, znb var3) throws Exception {
      if (!var1.m()) {
         var1.a();
      } else {
         this.a(var2);
         boolean var4 = false;
         String var5 = null;

         while(var1.l()) {
            if ("id".equals(var1.p())) {
               if (var3 != null) {
                  var3.b = var1.s();
               } else {
                  this.g.j = var1.s();
               }
            } else if ("blackAndWhite".equals(var1.p())) {
               var2.setBlackAndWhite(zase.ax(var1.s()));
            } else if ("cellComments".equals(var1.p())) {
               var2.setPrintComments(zase.d(var1.s()));
            } else if ("draft".equals(var1.p())) {
               var2.setPrintDraft(zase.ax(var1.s()));
            } else if ("errors".equals(var1.p())) {
               var2.setPrintErrors(zase.e(var1.s()));
            } else if ("useFirstPageNumber".equals(var1.p())) {
               var4 = zase.ax(var1.s());
            } else if ("firstPageNumber".equals(var1.p())) {
               var5 = var1.s();
            } else if ("fitToHeight".equals(var1.p())) {
               var2.a(zase.C(var1.s()));
            } else if ("fitToWidth".equals(var1.p())) {
               try {
                  var2.b(zase.C(var1.s()));
               } catch (Exception var8) {
                  ;
               }
            } else if ("horizontalDpi".equals(var1.p())) {
               this.a(var2, var1.s());
            } else if ("verticalDpi".equals(var1.p())) {
               this.a(var2, var1.s());
            } else if ("orientation".equals(var1.p())) {
               var2.setOrientation(zase.c(var1.s()));
            } else if ("pageOrder".equals(var1.p())) {
               var2.setOrder(zase.f(var1.s()));
            } else if ("paperSize".equals(var1.p())) {
               var2.setPaperSize(zase.C(var1.s()));
            } else if ("copies".equals(var1.p())) {
               var2.setPrintCopies(zase.C(var1.s()));
            } else if ("scale".equals(var1.p())) {
               int var6 = zase.C(var1.s());
               if (var6 >= 10 && var6 <= 400) {
                  var2.d(var6);
                  if (var2.isPercentScale()) {
                     var2.e(false);
                  }
               }
            }
         }

         var1.k();
         var1.a();
         if (var4 && var5 != null) {
            try {
               var2.setFirstPageNumber(zase.C(var5));
            } catch (Exception var7) {
               ;
            }
         }

      }
   }

   private void a(PageSetup var1, String var2) {
      if (var2.length() <= 5) {
         try {
            var1.setPrintQuality(zase.C(var2));
         } catch (Exception var4) {
            ;
         }
      }

   }

   private void a(PageSetup var1) {
      var1.setPrintQuality(600);
      var1.c(1);
      var1.setHFScaleWithDoc(true);
      var1.setHFAlignMargins(true);
      var1.setHFDiffOddEven(false);
      var1.setHFDiffFirst(false);
      if (var1.isPercentScale()) {
         var1.setZoom(100);
      }

   }

   private void b(zcfw var1, PageSetup var2) throws Exception {
      if (!var1.m()) {
         var1.a();
      } else {
         while(var1.l()) {
            if ("left".equals(var1.p())) {
               var2.setLeftMarginInch(zase.B(var1.s()));
            } else if ("right".equals(var1.p())) {
               var2.setRightMarginInch(zase.B(var1.s()));
            } else if ("top".equals(var1.p())) {
               var2.setTopMarginInch(zase.B(var1.s()));
            } else if ("bottom".equals(var1.p())) {
               var2.setBottomMarginInch(zase.B(var1.s()));
            } else if ("header".equals(var1.p())) {
               var2.setHeaderMarginInch(zase.B(var1.s()));
            } else if ("footer".equals(var1.p())) {
               var2.setFooterMarginInch(zase.B(var1.s()));
            }
         }

         var1.k();
         var1.a();
      }
   }

   private void c(zcfw var1, PageSetup var2) throws Exception {
      if (!var1.m()) {
         var1.a();
      } else {
         var2.setPrintGridlines(false);
         var2.setPrintHeadings(false);
         var2.setCenterHorizontally(false);
         var2.setCenterVertically(false);

         while(true) {
            while(var1.l()) {
               if ("gridLines".equals(var1.p()) && "1".equals(var1.s())) {
                  var2.setPrintGridlines(true);
               } else if ("headings".equals(var1.p()) && "1".equals(var1.s())) {
                  var2.setPrintHeadings(true);
               } else if ("horizontalCentered".equals(var1.p()) && "1".equals(var1.s())) {
                  var2.setCenterHorizontally(true);
               } else if ("verticalCentered".equals(var1.p()) && "1".equals(var1.s())) {
                  var2.setCenterVertically(true);
               }
            }

            var1.k();
            var1.a();
            return;
         }
      }
   }

   private void x(zcfw var1) throws Exception {
      if ((this.l & 8) == 0) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("mergeCell".equals(var1.p())) {
               String[] var2 = com.aspose.cells.b.a.zv.d(var1.a("ref"), ':');
               var1.a();
               CellArea var3 = new CellArea();
               byte var4;
               byte var5;
               int[] var7;
               int var12;
               int var13;
               if (var2.length > 1) {
                  var4 = 0;
                  var5 = 0;
                  int var6 = var3.StartRow;
                  var7 = new int[]{var6};
                  int[] var8 = new int[]{var4};
                  CellsHelper.a(var2[0], var7, var8);
                  var6 = var7[0];
                  var12 = var8[0];
                  var3.StartRow = var6;
                  int var9 = var3.EndRow;
                  int[] var10 = new int[]{var9};
                  int[] var11 = new int[]{var5};
                  CellsHelper.a(var2[1], var10, var11);
                  var9 = var10[0];
                  var13 = var11[0];
                  var3.EndRow = var9;
                  var3.StartColumn = var12;
                  var3.EndColumn = var13;
               } else {
                  var4 = 0;
                  var5 = 0;
                  int[] var14 = new int[]{var4};
                  var7 = new int[]{var5};
                  CellsHelper.a(var2[0], var14, var7);
                  var12 = var14[0];
                  var13 = var7[0];
                  var3.StartRow = var12;
                  var3.StartColumn = var13;
                  var3.EndRow = var3.StartRow;
                  var3.EndColumn = var3.StartColumn;
               }

               this.c.q().a(var3);
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void y(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         if (this.n) {
            if (!this.m.startSheet(this.b)) {
               var1.a();
               return;
            }
         } else if ((this.l & 1) == 0) {
            var1.a();
            return;
         }

         Workbook var2 = this.b.c().n();
         if (this.n) {
            this.c.a(128, 128, 16);
         } else {
            this.c.a(8192, 32768, 64);
         }

         this.e = this.c.f();
         this.d = this.c.getRows();
         this.h = this.e instanceof zbaz;
         this.i = new zbaz(1, 32, this.c.r().g, this.c.b);
         this.u = new zbbj();
         this.u.a(0, this.c);
         this.v = new zbbj();
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else {
               if (!"row".equals(var1.p())) {
                  var1.a();
                  throw new CellsException(6, "Invalid sheetData sub Element " + var1.p());
               }

               var2.l();
               this.z(var1);
               ++this.u.a;
            }
         }

         var1.h();
         if (this.q.size() > 0) {
            while(true) {
               this.c();
               if (this.q.size() < 1) {
                  break;
               }

               ++this.u.a;
            }
         }

         this.e.a(-10, 0, 0, 0);
         this.c.g();
         this.c.a((short)this.B);
      }
   }

   private void z(zcfw var1) throws Exception {
      this.v.a(this.u);
      boolean var2 = this.n;
      boolean var3 = false;
      boolean var4 = false;
      boolean var5 = false;
      int var6 = -1;
      int var7 = 32;
      if (var1.m()) {
         while(true) {
            while(var1.l()) {
               if ("r".equals(var1.p())) {
                  int var18 = zase.C(var1.s()) - 1;
                  if (var18 > this.v.a) {
                     if (this.q.size() > 0) {
                        while(this.u.a < var18) {
                           this.c();
                           if (this.q.size() < 1 || this.q.size() < 1) {
                              break;
                           }

                           ++this.u.a;
                        }
                     } else {
                        this.u.a = var18;
                     }

                     this.v.a = var18;
                  }

                  if (var2) {
                     if (!this.m.startRow(this.v.a)) {
                        var1.a();
                        return;
                     }

                     var2 = false;
                  }
               } else if (!"spans".equals(var1.p())) {
                  if ("s".equals(var1.p())) {
                     var6 = zase.C(var1.s());
                  } else if ("customFormat".equals(var1.p())) {
                     var3 = zase.ax(var1.s());
                  } else if ("ht".equals(var1.p())) {
                     if (zapb.b(var1.s())) {
                        double var17 = zase.B(var1.s());
                        if (var17 > 409.5D) {
                           var17 = 409.5D;
                        }

                        this.v.e = (short)((int)(var17 * 20.0D + 0.5D));
                        var5 = true;
                     }
                  } else if ("customHeight".equals(var1.p())) {
                     var4 = zase.ax(var1.s());
                  } else if ("hidden".equals(var1.p())) {
                     this.v.b(zase.ax(var1.s()));
                  } else if ("outlineLevel".equals(var1.p())) {
                     this.v.a((byte)zase.E(var1.s()));
                  } else if ("collapsed".equals(var1.p())) {
                     this.v.a(zase.ax(var1.s()));
                  }
               } else {
                  String var8 = var1.s();
                  if (var8 != null) {
                     String[] var9 = com.aspose.cells.b.a.zv.d(var8, ' ');
                     var7 = 0;
                     String[] var10 = var9;
                     int var11 = var9.length;

                     for(int var12 = 0; var12 < var11; ++var12) {
                        String var13 = var10[var12];
                        int var14 = var13.indexOf(58);
                        if (var14 > 0) {
                           int var15 = zase.C(var13.substring(0, 0 + var14));
                           int var16 = zase.C(var13.substring(var14 + 1));
                           var7 += var16 - var15 + 1;
                        }
                     }

                     if (var7 < 1) {
                        var7 = 32;
                     }
                  }
               }
            }

            var1.k();
            break;
         }
      }

      if (var2 && !this.m.startRow(this.v.a)) {
         var1.a();
      } else {
         if (var3 && var6 != -1) {
            Object var19 = this.a.d.get(var6);
            if (var19 != null) {
               this.v.d = (Integer)var19;
               this.v.d(true);
            }
         }

         if (var5) {
            this.v.c(!var4);
         } else if (!var4) {
            this.v.c(true);
         }

         this.a(this.v, var7);
         if (this.n && !this.m.processRow(this.k)) {
            if (this.z > -1) {
               this.e.c(this.z, 1);
            }

            var1.a();
         } else {
            this.x.a(0);
            if (var1.n()) {
               var1.a();
            } else {
               this.A = -1;
               var1.d();

               while(var1.r() != 4) {
                  var1.j();
                  if (var1.r() != 1) {
                     var1.a();
                  } else if ("c".equals(var1.p())) {
                     this.A(var1);
                     this.x.a(this.x.a + 1);
                  } else {
                     var1.a();
                  }
               }

               var1.h();
            }

            if (this.q.size() > 0) {
               this.a(this.x.a, Integer.MAX_VALUE);
               if (this.q.size() > 0) {
                  this.b();
               }
            }

            this.a(this.v);
         }
      }
   }

   private void a(zbbj var1, int var2) {
      this.i.e(-1);
      this.z = this.e.a(var1.a, this.z);
      if (this.z > -1) {
         this.f = this.e.f(this.z);
         int var3 = this.f.a();
         if (var3 > 0) {
            this.j = this.i.f(this.i.a(-1, var1, Math.max(var2, var3)));
            this.j.a(-1, this.f, -1, var3, false);
         } else {
            this.j = this.i.f(this.i.a(-1, var1, var2));
         }
      } else {
         this.j = this.i.f(this.i.a(-1, var1, var2));
      }

      this.k = new Row(this.c, this.d, this.j, false);
   }

   private void a(zbbj var1) {
      if (!this.n || this.j.a() > 0) {
         if (this.z < 0) {
            this.z = this.e.a(-this.z - 1, this.j, false);
            this.e.f(this.z).l(0, 0);
         } else {
            this.f.b(var1, 13);
            if (!this.h) {
               this.f.e(-1);
               this.f.a(-1, this.j, -1, this.j.a(), false);
            }

            this.f.l(0, 0);
         }
      }

   }

   private void b() {
      for(int var3 = this.q.size() - 1; var3 > -1; --var3) {
         zyi var1 = (zyi)this.q.get(var3);
         CellArea var2;
         if (var1.a() != null) {
            var2 = var1.a().a();
         } else {
            var2 = var1.b().a;
         }

         if (var2.EndRow == this.u.a) {
            this.q.remove(var3);
         }
      }

   }

   private void c() {
      if (this.n) {
         if (!this.m.startRow(this.u.a)) {
            if (this.q.size() > 0) {
               this.b();
            }

            return;
         }

         this.a((zbbj)this.u, 0);
         if (!this.m.processRow(this.k)) {
            if (this.z > -1) {
               this.e.c(this.z, 1);
            }

            if (this.q.size() > 0) {
               this.b();
            }

            return;
         }
      } else {
         this.a((zbbj)this.u, 0);
      }

      this.A = -1;

      for(int var4 = this.q.size() - 1; var4 > -1; --var4) {
         zyi var1 = (zyi)this.q.get(var4);
         CellArea var2;
         if (var1.a() != null) {
            var2 = var1.a().a();
         } else {
            var2 = var1.b().a;
         }

         int var3 = var2.EndColumn;
         this.x.a(var2.StartColumn);

         while(this.x.a <= var3) {
            this.d();
            this.a((zyi)var1, (String)null, (String)null);
            ++this.x.a;
         }

         if (var2.EndRow == this.u.a) {
            this.q.remove(var4);
         }
      }

      if (this.q.size() > 0) {
         this.b();
      }

   }

   private void a(int var1, int var2) {
      for(int var6 = this.q.size() - 1; var6 > -1; --var6) {
         zyi var3 = (zyi)this.q.get(var6);
         CellArea var4;
         if (var3.a() != null) {
            var4 = var3.a().a();
         } else {
            var4 = var3.b().a;
         }

         if (var4.EndColumn >= var1 && var4.StartColumn <= var2) {
            int var5 = Math.min(var4.EndColumn, var2);
            this.x.a(Math.max(var4.StartColumn, var1));

            while(this.x.a <= var5) {
               this.d();
               this.a((zyi)var3, (String)null, (String)null);
               ++this.x.a;
            }

            if (var5 == var4.EndColumn && var4.EndRow == this.v.a) {
               this.q.remove(var6);
            }
         }
      }

   }

   void a(zajm var1) {
      this.D = var1;
   }

   private static int b(String var0) {
      int var1 = 0;

      for(int var3 = 0; var3 < var0.length(); ++var3) {
         char var2 = (char)(var0.charAt(var3) | 32);
         if (var2 >= 'a' && var2 <= 'z') {
            var1 = var1 * 26 + var2 - 97 + 1;
         } else if (var2 != '$') {
            break;
         }
      }

      if (var1 > 0) {
         --var1;
      }

      return var1;
   }

   private void A(zcfw var1) throws Exception {
      boolean var2 = this.n;
      int var3 = -1;
      String var4 = "n";
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            if (var1.p().length() != 1) {
               if ("ph".equals(var1.p())) {
                  this.x.e = zase.ax(var1.s());
               }
            } else {
               switch(var1.p().charAt(0)) {
               case 'r':
                  short var5 = (short)b(var1.s());
                  if (var5 < this.x.a) {
                     throw new CellsException(6, "Invalid cell name");
                  }

                  if (var5 > this.x.a) {
                     if (this.q.size() > 0) {
                        this.a(this.x.a, var5 - 1);
                     }

                     this.x.a = var5;
                  }

                  if (var2) {
                     if (!this.m.startCell(var5)) {
                        var1.a();
                        return;
                     }

                     var2 = false;
                  }
                  break;
               case 's':
                  var3 = zase.C(var1.s());
                  break;
               case 't':
                  var4 = var1.s();
               }
            }
         }
      }

      if (var2 && !this.m.startCell(this.x.a)) {
         var1.a();
      } else {
         Object var20;
         if (var3 != -1) {
            var20 = this.a.d.get(var3);
            if (var20 != null) {
               int var6 = (Integer)var20;
               this.x.b = var6;
            }
         } else {
            this.x.b = 15;
         }

         if (var1.n()) {
            var1.a();
            if (this.q.size() > 0) {
               zyi var21 = this.f();
               if (var21 != null) {
                  this.d();
                  this.a((zyi)var21, (String)null, (String)var4);
                  return;
               }
            }

            if (this.s && (!this.t || this.a.e.get(var3) == null) && (var3 == -1 || this.x.b != 15)) {
               this.d();
               this.e();
            }
         } else {
            this.d();
            var20 = null;
            String var22 = null;
            var1.d();

            while(true) {
               while(var1.r() != 4) {
                  var1.j();
                  if (var1.r() != 1) {
                     var1.a();
                  } else if ("v".equals(var1.p())) {
                     var1.a(1);
                     var22 = var1.i();
                     var1.a(0);
                     if (var1.r() == 3) {
                        var1.a();
                     }
                  } else if ("f".equals(var1.p())) {
                     String var23 = var1.a("t");
                     String var8;
                     Cell var25;
                     if (var23 == null) {
                        var8 = var1.i();
                        if (var8.length() != 0) {
                           var25 = new Cell(this.k, this.A, this.y, this.y == this.x);
                           var25.b(var8);
                        }
                     } else {
                        String var26;
                        if ("array".equals(var23)) {
                           var8 = var1.a("ref");
                           var26 = var1.i();
                           if (var8 != null && var26 != null) {
                              Cell var28 = new Cell(this.k, this.A, this.y, this.y == this.x);
                              CellArea var30 = (CellArea)CellArea.a(var8, true);
                              this.c.r().x().a(var28, "=" + var26.trim(), var30.e(), var30.f());
                              ((zyi)this.y.d).b(true);
                              if (!var30.b()) {
                                 com.aspose.cells.b.a.a.ze.a(this.q, this.y.d);
                              }
                           }
                        } else if ("shared".equals(var23)) {
                           var8 = var1.a("ref");
                           var26 = var1.a("si");
                           String var27 = var1.i();
                           if (var8 != null && var27 != null && !var27.equals("")) {
                              Cell var29 = new Cell(this.k, this.A, this.y, this.y == this.x);
                              CellArea var31 = (CellArea)CellArea.a(var8, true);
                              this.c.r().x().b(var29, "=" + var27.trim(), var31.e(), var31.f());
                              ((zyj)this.y.d).a().a(var31);
                              if (var26 != null) {
                                 this.p.put(var26, this.y.d);
                              }
                           } else if (var26 != null) {
                              var20 = this.p.get(var26);
                           }
                        } else if ("dataTable".equals(var23)) {
                           var8 = var1.a("ref");
                           CellArea var9 = (CellArea)CellArea.a(var8, true);
                           boolean var10 = false;
                           String var11 = var1.a("del1");
                           if (var11 != null) {
                              var10 = zase.ax(var11);
                           }

                           boolean var12 = false;
                           var11 = var1.a("del2");
                           if (var11 != null) {
                              var12 = zase.ax(var11);
                           }

                           boolean var13 = false;
                           var11 = var1.a("dt2D");
                           if (var11 != null) {
                              var13 = zase.ax(var11);
                           }

                           boolean var14 = false;
                           var11 = var1.a("dtr");
                           if (var11 != null) {
                              var14 = zase.ax(var11);
                           }

                           boolean var15 = false;
                           var11 = var1.a("aca");
                           if (var11 != null) {
                              var15 = zase.ax(var11);
                           }

                           String var16 = var1.a("r1");
                           String var17 = var1.a("r2");
                           Cell var18 = new Cell(this.k, this.A, this.y, this.y == this.x);
                           zyk var19 = var18.a(var9, var13, var14, var16, var17, var10, var12);
                           var19.b().a(var15);
                           this.y.c = 5;
                           this.y.d = var19;
                           this.c.b.a(var19);
                           var1.a();
                           if (!var9.b()) {
                              com.aspose.cells.b.a.a.ze.a(this.q, (Object)var19);
                           }
                        } else {
                           var8 = var1.i();
                           if (var8.length() != 0) {
                              var25 = new Cell(this.k, this.A, this.y, this.y == this.x);
                              var25.b(var8);
                           }
                        }
                     }
                  } else if ("is".equals(var1.p())) {
                     if ("inlineStr".equals(var4) && this.D != null) {
                        zayy var7 = this.D.b(var1);
                        this.y.c = 4;
                        this.y.d = var7;
                     } else {
                        var1.a();
                     }
                  } else {
                     var1.a();
                  }
               }

               var1.h();
               if (var20 != null) {
                  this.a((zyi)var20, var22, var4);
               } else {
                  zyi var24;
                  if (this.y.c == 5) {
                     if (var22 != null) {
                        if (var22.equals("")) {
                           var24 = (zyi)this.y.d;
                           var24.c = 4;
                           var24.d = "";
                        } else {
                           this.a(var22, var4);
                        }
                     }

                     if (!this.e()) {
                        this.c.b.b(((zyi)this.y.d).a);
                     }
                  } else if (this.y.c == 4) {
                     this.e();
                  } else {
                     if (this.q.size() > 0) {
                        var24 = this.f();
                        if (var24 != null) {
                           this.a(var24, var22, var4);
                           return;
                        }
                     }

                     if (var22 != null && var22.length() > 0) {
                        this.a(var22, var4);
                     }

                     if (!this.e() && this.y.c == 4 && "str".equals(var4)) {
                        this.c.r().g.c(((zayy)this.y.d).e);
                     }
                  }
               }
               break;
            }
         }

      }
   }

   private void d() {
      this.A = this.j.a(this.x.a, this.A);
      if (this.A < 0) {
         this.A = this.j.a(-this.A - 1, this.x);
      } else {
         this.j.b(this.A, this.x, 6);
      }

      this.y = this.j.a(this.A, this.x, 6);
   }

   private boolean e() {
      this.j.b(this.A, this.y, 6);
      if (this.n && !this.m.processCell(new Cell(this.k, this.A, this.y, this.y == this.x))) {
         this.j.c(this.A, 1);
         return false;
      } else {
         if (this.y.a > this.B) {
            this.B = this.y.a;
         }

         return true;
      }
   }

   private void a(zyi var1, String var2, String var3) {
      zyi var4 = new zyi(this.v.a, this.y.a);
      this.y.c = 5;
      this.y.d = var4;
      this.c.b.a(var4);
      if (var2 != null) {
         if (var2.equals("")) {
            var4.c = 4;
            var4.d = "";
         } else {
            this.a(var2, var3);
         }
      }

      if (var1.l()) {
         var4.b(true);
      }

      byte[] var5 = var1.b;
      byte[] var6 = new byte[var5.length];
      System.arraycopy(var5, 0, var6, 0, var5.length);
      var4.b = var6;
      if (this.n) {
         byte[] var7 = var1.b;
         int var8 = var1.e;
         short var9 = var1.f;
         int var10 = var1.c;
         Object var11 = var1.d;
         var1.e = var4.e;
         var1.f = var4.f;
         var1.c = var4.c;
         var1.d = var4.d;
         if (var1.a(this.c)) {
            var1.b = this.c.r().x().a().a((byte)2, var4.e, var4.f);
         } else {
            var1.b = this.c.r().x().a().a((byte)1, var4.e, var4.f);
         }

         this.y.d = var1;
         if (this.e()) {
            this.y.d = var4;
            this.j.b(this.A, this.y);
         } else {
            this.c.b.b(var4.a);
         }

         var1.b = var7;
         var1.e = var8;
         var1.f = var9;
         var1.c = var10;
         var1.d = var11;
      } else {
         this.e();
      }

   }

   private zyi f() {
      for(int var3 = this.q.size() - 1; var3 > -1; --var3) {
         zyi var1 = (zyi)this.q.get(var3);
         CellArea var2;
         if (var1.a() != null) {
            var2 = var1.a().a();
         } else {
            var2 = var1.b().a;
         }

         if (var2.EndColumn == this.x.a) {
            if (var2.EndRow == this.v.a) {
               this.q.remove(var3);
            }

            return var1;
         }

         if (var2.StartColumn <= this.x.a && var2.EndColumn > this.x.a) {
            return var1;
         }
      }

      return null;
   }

   private void a(int var1, Object var2) {
      if (this.y.c == 5) {
         zyi var3 = (zyi)this.y.d;
         var3.c = var1;
         var3.d = var2;
      } else {
         this.y.c = var1;
         this.y.d = var2;
      }

   }

   private void a(String var1, String var2) {
      zyi var4;
      switch(E.a(var2)) {
      case 96:
         if (!"Infinity".equals(var1) && !"NaN".equals(var1)) {
            zavz.a(var1.trim(), this.w);
            this.a(this.w.c, this.w.d);
         } else {
            zst var6 = zst.c;
            this.a(3, zsk.b(var6));
         }
         break;
      case 97:
         int var3 = zase.C(var1);
         if (var3 >= 0) {
            if (this.y.c == 5) {
               var4 = (zyi)this.y.d;
               var4.c = 4;
               zayy var5 = this.r.b(var3);
               if (var5 != null) {
                  var4.d = var5.c;
               }
            } else {
               this.y.c = 4;
               this.y.d = this.r.a(var3);
            }
         }
         break;
      case 98:
         if (this.y.c != 5) {
            this.y.c = 4;
            this.y.d = this.c.r().g.a(var1);
         } else {
            var4 = (zyi)this.y.d;
            var4.c = 4;
            var4.d = var1;
         }
         break;
      case 99:
         this.a(3, zsk.a(var1));
         break;
      case 100:
         this.a(2, "1".equals(var1));
      }

   }

   private void B(zcfw var1) throws Exception {
      if (!var1.n() && (this.l & 256) != 0) {
         int var2 = -1;
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("col".equals(var1.p())) {
               var2 = this.a(var1, var2);
            } else {
               var1.a();
            }
         }

         var1.h();
      } else {
         var1.a();
      }
   }

   private int a(zcfw var1, int var2) throws Exception {
      if (!var1.m()) {
         var1.a();
         return var2;
      } else {
         int var3 = -1;
         int var4 = -1;
         int var5 = -1;
         short var6 = -1;
         double var7 = -1.0D;
         boolean var9 = false;
         boolean var10 = false;
         boolean var11 = false;
         boolean var12 = false;
         boolean var13 = false;

         while(var1.l()) {
            switch(E.a(var1.p())) {
            case 35:
               var10 = zase.ax(var1.s());
               break;
            case 101:
               var3 = zase.C(var1.s()) - 1;
               if (var4 == -1) {
                  var4 = var3;
               }
               break;
            case 102:
               var4 = zase.C(var1.s()) - 1;
               break;
            case 103:
               var7 = zase.B(var1.s());
               var9 = true;
               break;
            case 104:
               var5 = zase.C(var1.s());
               break;
            case 105:
               var11 = zase.ax(var1.s());
               break;
            case 106:
               var6 = zase.E(var1.s());
               break;
            case 107:
               var12 = zase.ax(var1.s());
               break;
            case 108:
               var13 = zase.ax(var1.s());
            }
         }

         var1.k();
         var1.a();
         ColumnCollection var14 = this.c.getColumns();
         double var15 = var14.b();
         double var17 = var9 ? this.a(var7) : var15;
         int var19 = 15;
         if (var5 != -1) {
            Object var20 = this.a.d.get(var5);
            if (var20 != null) {
               var19 = (Integer)var20;
            }
         }

         for(int var22 = var3; var22 <= var4; ++var22) {
            Column var21 = null;
            if (var4 >= 16383) {
               var21 = var14.a();
               var21.a(var3);
            } else {
               this.C[var22] = var19;
               if (var3 < var2) {
                  var21 = var14.get(var22);
               } else {
                  var21 = var14.d(var22);
               }
            }

            var21.d(!var11);
            if (var9) {
               var21.setWidth(var17);
            }

            var21.c(var19);
            if (var6 != -1) {
               var21.a((byte)var6);
            }

            var21.setHidden(var10);
            var21.b(var12);
            var21.c(var13);
            if (var4 >= 16383) {
               break;
            }
         }

         return var2 > var4 ? var2 : var4;
      }
   }

   private double a(double var1) {
      WorksheetCollection var3 = this.a.a.getWorksheets();
      int var4 = (int)(var1 * (double)var3.I() + 0.5D);
      return zkp.a((double)var4, var3);
   }

   private void C(zcfw var1) throws Exception {
      if (!var1.n() && (this.l & 256) != 0) {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("sheetView".equals(var1.p())) {
               this.D(var1);
            } else {
               var1.a();
            }
         }

         var1.h();
      } else {
         var1.a();
      }
   }

   private void D(zcfw var1) throws Exception {
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            if ("showGridLines".equals(var1.p())) {
               this.b.setGridlinesVisible(zase.ax(var1.s()));
            } else if ("showRowColHeaders".equals(var1.p())) {
               this.b.setRowColumnHeadersVisible(zase.ax(var1.s()));
            } else if ("tabSelected".equals(var1.p())) {
               this.b.setSelected(zase.ax(var1.s()));
            } else if ("view".equals(var1.p())) {
               this.b.setViewType(zase.ay(var1.s()));
            } else if ("zoomScale".equals(var1.p())) {
               this.b.setZoom(zase.C(var1.s()));
            } else if ("zoomScaleNormal".equals(var1.p())) {
               this.b.u()[0] = zase.C(var1.s());
            } else if ("zoomScaleSheetLayoutView".equals(var1.p())) {
               this.b.u()[1] = zase.C(var1.s());
            } else if ("zoomScalePageLayoutView".equals(var1.p())) {
               this.b.u()[2] = zase.C(var1.s());
            } else if ("topLeftCell".equals(var1.p())) {
               String var2 = var1.s();
               byte var3 = 0;
               byte var4 = 0;
               int[] var5 = new int[]{var3};
               int[] var6 = new int[]{var4};
               CellsHelper.a(var2, var5, var6);
               int var8 = var5[0];
               int var10 = var6[0];
               this.b.setFirstVisibleRow(var8);
               this.b.setFirstVisibleColumn(var10);
            } else if ("showRuler".equals(var1.p())) {
               this.b.setRulerVisible(zase.ax(var1.s()));
            } else if ("showZeros".equals(var1.p())) {
               this.b.setDisplayZeros(zase.ax(var1.s()));
            } else if ("rightToLeft".equals(var1.p())) {
               this.b.setDisplayRightToLeft(zase.ax(var1.s()));
            } else if ("showOutlineSymbols".equals(var1.p())) {
               this.b.setOutlineShown(zase.ax(var1.s()));
            } else if (!"defaultGridColor".equals(var1.p())) {
               if ("colorId".equals(var1.p())) {
                  this.b.f(zase.C(var1.s()));
               } else if ("showFormulas".equals(var1.p())) {
                  this.b.setShowFormulas(zase.ax(var1.s()));
               }
            }
         }
      }

      if (var1.n()) {
         var1.a();
      } else {
         zqh var7 = new zqh();
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("pane".equals(var1.p())) {
               var7.a = this.E(var1);
            } else if ("selection".equals(var1.p())) {
               if (var1.m()) {
                  zqj var9 = new zqj();
                  var9.b = var1.a("activeCell");
                  var9.d = var1.a("sqref");
                  var9.a = var1.a("pane");
                  String var11 = var1.a("activeCellId");
                  if (var11 != null) {
                     var9.c = zase.C(var11);
                  }

                  com.aspose.cells.b.a.a.ze.a(var7.b, (Object)var9);
               }

               var1.a();
            } else {
               var1.a();
            }
         }

         var1.h();
         var7.a(this.b);
      }
   }

   private zqi E(zcfw var1) throws Exception {
      if (!var1.m()) {
         var1.a();
         return null;
      } else {
         zqi var2 = new zqi();

         while(var1.l()) {
            if ("activePane".equals(var1.p())) {
               var2.e = var1.s();
            } else if ("state".equals(var1.p())) {
               var2.a = var1.s();
            } else if ("topLeftCell".equals(var1.p())) {
               var2.d = var1.s();
            } else if ("xSplit".equals(var1.p())) {
               var2.b = zase.B(var1.s());
            } else if ("ySplit".equals(var1.p())) {
               var2.c = zase.B(var1.s());
            }
         }

         var1.k();
         var1.a();
         return var2;
      }
   }

   private boolean F(zcfw var1) throws Exception {
      var1.a(0);
      var1.j();
      if (var1.r() == 1 && "worksheet".equals(var1.p())) {
         if (var1.m()) {
            while(var1.l()) {
               switch(E.a(var1.o())) {
               case 109:
               case 110:
               case 111:
               case 112:
               case 113:
                  break;
               default:
                  com.aspose.cells.b.a.a.ze.a(this.b.g.g, (Object)(new znm(var1.o(), var1.s())));
               }
            }

            var1.k();
         }

         return true;
      } else {
         throw new CellsException(6, "Absent root element: worksheet");
      }
   }

   void b(zcfw var1, boolean var2) throws Exception {
      if ((this.l & 16) == 0) {
         var1.a();
      } else if (var1.n()) {
         var1.a();
      } else {
         FormatConditionCollection var3 = new FormatConditionCollection(this.b);
         int var4 = 0;
         ArrayList var5 = new ArrayList();
         boolean var6 = false;
         String var7 = var1.a("pivot", "");
         if (var7 != null) {
            var3.d = zase.ax(var7);
         }

         String var8;
         if (!var2) {
            var8 = var1.a("sqref", "");
            if (var8 != null && var8.length() > 0) {
               this.a(var8, var5);
            }

            com.aspose.cells.b.a.a.ze.a(var3.b, (Collection)var5);
            var4 = this.b.getConditionalFormattings().a(var3);
            var3.a = this.b.getConditionalFormattings();
            var1.d();

            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("cfRule".equals(var1.p())) {
                  boolean var9 = this.a(var1, var3, false);
                  if (!var6 && var9) {
                     var6 = true;
                  }
               } else {
                  var1.a();
               }
            }

            var1.h();
         } else {
            var1.d();

            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("cfRule".equals(var1.p())) {
                  boolean var10 = this.a(var1, var3, true);
                  if (!var6 && var10) {
                     var6 = true;
                  }
               } else if ("sqref".equals(var1.p())) {
                  var8 = var1.i();
                  if (var8 != null && var8.length() > 0) {
                     this.a(var8, var5);
                  }

                  com.aspose.cells.b.a.a.ze.a(var3.b, (Collection)var5);
                  if (var3.getCount() > 0) {
                     var4 = this.b.getConditionalFormattings().a(var3);
                     var3.a = this.b.getConditionalFormattings();
                  }
               } else {
                  var1.a();
               }
            }

            var1.h();
         }

         if (!var6) {
            this.b.getConditionalFormattings().removeAt(var4);
         }

      }
   }

   private void a(zcfw var1, FormatCondition var2) throws Exception {
      var1.d();

      while(true) {
         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if (!"ext".equals(var1.p())) {
               var1.a();
            } else {
               var1.d();

               while(var1.r() != 4) {
                  var1.j();
                  if (var1.r() != 1) {
                     var1.a();
                  } else if ("id".equals(var1.p())) {
                     String var3 = var1.i();
                     var2.a(new com.aspose.cells.b.a.zh(var3.substring(1, 1 + (var3.length() - 2))));
                  } else {
                     var1.a();
                  }
               }

               var1.h();
            }
         }

         var1.h();
         return;
      }
   }

   private boolean a(zcfw var1, FormatConditionCollection var2, boolean var3) throws Exception {
      String var4 = null;
      int var6 = 6;
      boolean var7 = false;
      String[] var8 = new String[2];
      int var9 = -1;
      int var10 = 0;
      String var11 = null;
      String var12 = null;
      String var13 = null;
      String var14 = null;
      String var15 = null;
      String var16 = null;
      String var17 = null;
      String var18 = null;
      String var19 = null;
      String var20 = null;
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            switch(E.a(var1.p())) {
            case 114:
               var10 = zase.C(var1.s());
               break;
            case 115:
               var4 = var1.s();
               break;
            case 116:
               var9 = zase.C(var1.s());
               break;
            case 117:
               var20 = var1.s();
               break;
            case 118:
               var7 = true;
               break;
            case 119:
               var11 = var1.s();
               break;
            case 120:
               var13 = var1.s();
               break;
            case 121:
               var12 = var1.s();
               break;
            case 122:
               var14 = var1.s();
               break;
            case 123:
               var15 = var1.s();
               break;
            case 124:
               var16 = var1.s();
               break;
            case 125:
               var17 = var1.s();
               break;
            case 126:
               var18 = var1.s();
               break;
            case 127:
               var19 = var1.s();
            }
         }
      }

      if (!zase.F(var4)) {
         var1.a();
         return false;
      } else {
         int var5 = zase.G(var4);
         if (var20 != null && ("cellIs".equals(var4) || "expression".equals(var4))) {
            var6 = zase.h(var20);
         }

         int var21 = 0;
         IconSet var22 = null;
         ColorScale var23 = null;
         DataBar var24 = null;
         Style var25 = null;
         if (!var1.n()) {
            var1.d();
            int var26 = 0;

            while(true) {
               while(var1.r() != 4) {
                  var1.j();
                  if (var1.r() != 1) {
                     var1.a();
                  } else if (("formula".equals(var1.p()) || "f".equals(var1.p())) && var26 < 2) {
                     var8[var26++] = "=" + var1.i();
                  } else {
                     FormatCondition var27;
                     if ("iconSet".equals(var1.p())) {
                        var21 = var2.addCondition(var5);
                        var27 = var2.get(var21);
                        var22 = this.c(var1, var27);
                        var27.a(var22);
                     } else if ("colorScale".equals(var1.p())) {
                        var21 = var2.addCondition(var5);
                        var27 = var2.get(var21);
                        var23 = this.d(var1, var27);
                        if (var23 != null) {
                           var27.a(var23);
                        }
                     } else if ("dataBar".equals(var1.p())) {
                        if (!var3) {
                           var21 = var2.addCondition(var5);
                           var27 = var2.get(var21);
                           var24 = this.a(var1, var27, var3);
                           var27.a(var24);
                        } else {
                           var27 = null;
                           int var28 = this.b.getConditionalFormattings().getCount();
                           if (var28 > 0 && var19 != null) {
                              com.aspose.cells.b.a.zh var29 = new com.aspose.cells.b.a.zh(var19.substring(1, 1 + (var19.length() - 2)));

                              for(int var30 = 0; var30 < var28; ++var30) {
                                 FormatConditionCollection var31 = this.b.getConditionalFormattings().get(var30);

                                 for(int var32 = 0; var32 < var31.getCount(); ++var32) {
                                    FormatCondition var33 = var31.get(var32);
                                    if (var33.b().equals(var29)) {
                                       var27 = var33;
                                       break;
                                    }
                                 }

                                 if (var27 != null) {
                                    break;
                                 }
                              }

                              if (var27 != null) {
                                 var24 = this.a(var1, var27, var3);
                                 var27.a(var24);
                              } else {
                                 var1.a();
                              }
                           } else {
                              var1.a();
                           }
                        }
                     } else if ("dxf".equals(var1.p())) {
                        znu var35 = zajp.a(this.b.c(), var1);
                        var25 = new Style(this.b.c());
                        a(var25, var35);
                     } else if ("extLst".equals(var1.p()) && !var3) {
                        var27 = var2.get(var21);
                        if (var27.getType() == 3) {
                           this.a(var1, var27);
                        } else {
                           var1.a();
                        }
                     } else {
                        var1.a();
                     }
                  }
               }

               var1.h();
               break;
            }
         } else {
            var1.a();
         }

         if (var5 != 0 && var5 != 1) {
            if (var5 != 4 && var5 != 3 && var5 != 2) {
               var21 = var2.addCondition(var5);
               FormatCondition var34 = var2.get(var21);
               if (var5 == 5) {
                  if (var13 != null) {
                     var34.getTop10().setRank(zase.C(var13));
                  }

                  if ("1".equals(var15)) {
                     var34.getTop10().setBottom(true);
                  }

                  if ("1".equals(var14)) {
                     var34.getTop10().setPercent(true);
                  }
               } else if (var5 == 17) {
                  if ("0".equals(var16)) {
                     var34.getAboveAverage().setAboveAverage(false);
                  }

                  if ("1".equals(var17)) {
                     var34.getAboveAverage().setEqualAverage(true);
                  }

                  if (var18 != null) {
                     var34.getAboveAverage().setStdDev(zase.C(var18));
                  }
               }

               if (var11 != null) {
                  var34.setText(var11);
               }

               if (var12 != null) {
                  var34.setTimePeriod(zase.Z(var12));
               }

               if (var8[0] != null) {
                  var34.setFormula1(var8[0]);
               }

               if (var8[1] != null) {
                  var34.setFormula2(var8[1]);
               }
            }
         } else {
            var21 = var2.addCondition(var5, var6, var8[0], var8[1]);
         }

         if (var2.getCount() > 0) {
            var2.get(var21).setStopIfTrue(var7);
            var2.get(var21).setPriority((short)var10);
            if (var9 != -1 && var9 < this.b.c().getDxfs().getCount()) {
               var2.get(var21).a(var9);
               var2.get(var21).setStyle(new Style(this.b.c()));
               var2.get(var21).getStyle().copy(this.b.c().getDxfs().get(var9));
            } else if (var25 != null) {
               var2.get(var21).setStyle(var25);
            }
         }

         if (var10 > var2.e.e()) {
            var2.e.a(var10);
         }

         return true;
      }
   }

   private void a(zcfw var1, ConditionalFormattingIcon var2) throws Exception {
      String var3 = var1.a("iconSet");
      String var4 = var1.a("iconId");
      var2.setType(zase.V(var3));
      var2.setIndex(com.aspose.cells.b.a.ze.f(var4));
      var1.a();
   }

   private ConditionalFormattingValue b(zcfw var1, FormatCondition var2) throws Exception {
      ConditionalFormattingValue var3 = new ConditionalFormattingValue(var2);
      String var4 = var1.a("gte");
      if ("0".equals(var4)) {
         var3.setGTE(false);
      }

      String var5 = var1.a("type");
      var3.setType(zase.Y(var5));
      if ("x14".equals(var1.q())) {
         if (var3.getType() != 2 && var3.getType() != 1 && var3.getType() != 6 && var3.getType() != 7) {
            var1.d();

            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("f".equals(var1.p())) {
                  var3.a(var1.i());
               } else {
                  var1.a();
               }
            }

            var1.h();
         } else {
            if (var1.a("type") != null) {
               var3.setType(zase.Y(var1.a("type")));
            }

            var1.a();
         }
      } else {
         if (var1.a("val") != null) {
            var3.a(var1.a("val"));
         }

         var1.a();
      }

      return var3;
   }

   private IconSet c(zcfw var1, FormatCondition var2) throws Exception {
      IconSet var3 = new IconSet(var2);
      String var4 = var1.a("iconSet");
      String var5 = var1.a("showValue");
      String var6 = var1.a("reverse");
      if (var4 != null) {
         var3.a(zase.V(var4));
      }

      if ("0".equals(var5)) {
         var3.setShowValue(false);
      }

      if ("1".equals(var6)) {
         var3.setReverse(true);
      }

      if (var1.n()) {
         var1.a();
         return var3;
      } else {
         int var7 = 0;
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("cfvo".equals(var1.p())) {
               ConditionalFormattingValue var8 = this.b(var1, var2);
               var3.getCfvos().a(var8);
            } else if ("cfIcon".equals(var1.p())) {
               ConditionalFormattingIcon var9 = var3.getCfIcons().get(var7);
               this.a(var1, var9);
               ++var7;
            } else {
               var1.a();
            }
         }

         var1.h();
         return var3;
      }
   }

   private ColorScale d(zcfw var1, FormatCondition var2) throws Exception {
      ColorScale var3 = new ColorScale(this.b.c().n(), var2);
      if (var1.n()) {
         var1.a();
         return null;
      } else {
         ConditionalFormattingValueCollection var4 = new ConditionalFormattingValueCollection(var2);
         ArrayList var5 = new ArrayList(3);
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("cfvo".equals(var1.p())) {
               ConditionalFormattingValue var6 = this.b(var1, var2);
               var4.a(var6);
            } else if ("color".equals(var1.p())) {
               zakp var7 = zajp.g(var1);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
            } else {
               var1.a();
            }
         }

         var1.h();
         if (var4.getCount() == 2) {
            var3.a = var4.get(0);
            var3.c = var4.get(1);
            var3.a((zakp)var5.get(0));
            var3.c((zakp)var5.get(1));
         } else if (var4.getCount() == 3) {
            var3.a = var4.get(0);
            var3.b = var4.get(1);
            var3.c = var4.get(2);
            var3.a((zakp)var5.get(0));
            var3.b((zakp)var5.get(1));
            var3.c((zakp)var5.get(2));
         } else {
            var3 = null;
         }

         return var3;
      }
   }

   private DataBar a(zcfw var1, FormatCondition var2, boolean var3) throws Exception {
      DataBar var4 = null;
      if (!var3) {
         var4 = new DataBar(this.b.c().n(), var2);
      } else {
         var4 = var2.getDataBar();
      }

      String var5;
      String var6;
      String var7;
      if (var3) {
         var5 = var1.a("gradient");
         var6 = var1.a("border");
         var7 = var1.a("direction");
         String var8 = var1.a("negativeBarColorSameAsPositive");
         String var9 = var1.a("negativeBarBorderColorSameAsPositive");
         String var10 = var1.a("axisPosition");
         if (var5 != null) {
            var4.setBarFillType(zase.ax(var5) ? 1 : 0);
         }

         if (var6 != null) {
            var4.getBarBorder().setType(zase.ax(var6) ? 1 : 0);
         }

         if (var7 != null) {
            var4.setDirection(zase.W(var7));
         }

         if (var10 != null) {
            var4.setAxisPosition(zase.X(var10));
         } else {
            var4.setAxisPosition(0);
         }

         if (var8 == null) {
            var4.getNegativeBarFormat().setColorType(0);
         } else {
            var4.getNegativeBarFormat().setColorType(zase.ax(var8) ? 1 : 0);
         }

         if (var9 != null) {
            var4.getNegativeBarFormat().setBorderColorType(zase.ax(var9) ? 1 : 0);
         }
      }

      var5 = var1.a("minLength");
      var6 = var1.a("maxLength");
      var7 = var1.a("showValue");
      if (var5 != null) {
         var4.setMinLength(zase.C(var5));
      }

      if (var6 != null) {
         var4.setMaxLength(zase.C(var6));
      }

      if ("0".equals(var7)) {
         var4.setShowValue(false);
      }

      if (var1.n()) {
         var1.a();
         return var4;
      } else {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("cfvo".equals(var1.p())) {
               ConditionalFormattingValue var11 = this.b(var1, var2);
               if (var11.getType() == 7) {
                  var4.a = null;
               }

               if (var4.a == null) {
                  var4.a = var11;
               } else {
                  var4.b = var11;
               }
            } else if ("color".equals(var1.p())) {
               var4.b(zajp.g(var1));
            } else if ("negativeBorderColor".equals(var1.p())) {
               var4.getNegativeBarFormat().a(zajp.g(var1));
            } else if ("negativeFillColor".equals(var1.p())) {
               var4.getNegativeBarFormat().b(zajp.g(var1));
            } else if ("axisColor".equals(var1.p())) {
               var4.a(zajp.g(var1));
            } else if ("borderColor".equals(var1.p())) {
               var4.getBarBorder().a(zajp.g(var1));
            } else {
               var1.a();
            }
         }

         var1.h();
         return var4;
      }
   }

   static void a(Style var0, znu var1) {
      var0.a((byte)0);
      if (var1.b != null) {
         if (var1.b.c != null) {
            znq.a(var1.b.c, var0);
         } else if (var1.b.b != null) {
            var1.b.b.b(var0);
         }
      }

      if (var1.a != null) {
         var1.a.a(var0);
      }

      if (var1.c != null) {
         var1.c.a(var0);
      }

      if (var1.d != null) {
         zxw var2 = var1.d;
         if (var2.b() > 0 || var2.a() != null && var2.a().length() > 0) {
            var0.a(var2.b(), var2.a(), var2.a);
         }
      }

      if (var1.e != null) {
         var1.e.a(var0, true);
      }

      if (var1.f != null) {
         var1.f.a(var0);
      }

   }
}
